package com.asiainfo.complier.ui;

import javax.swing.border.Border;
import java.awt.*;

public class ColorBorder implements Border {

	private Color c;

	ColorBorder(Color _c) {
		c = _c;
	}

	public void paintBorder(Component cx, Graphics g, int x, int y, int width,
			int height) {
		g.setColor(c);
		g.drawRoundRect(1, 1, cx.getWidth() - 2, cx.getHeight() - 2, 2, 2);
	}

	public Insets getBorderInsets(Component c) {

		return new Insets(2, 2, 2, 1);
	}

	public boolean isBorderOpaque() {

		return true;
	}

}
